import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;

public class FinalLevel extends Level {

	protected Image scoreMenu;

	protected String stopwatch;
	protected String totalScore;

	protected Font font = new Font("Berlin Sans FB Demi", Font.BOLD, 38);

	public FinalLevel(Gameloop gl, int maxScore, int beeLevelReproduction) {
		super(gl, maxScore, beeLevelReproduction);

		scoreMenu = ImageLoader.get().read("/Images/FinalScoreMenu.png");
	}

	public void update() {

		isFinish = maxScore <= gameloop.getScore().getTotalScore();

		if (isFinish) {
			stopwatch = gameloop.getScore().getStopwatch();
			totalScore = gameloop.getScore().getTotalGameScore();
		}
	}

	public void draw(Graphics g) {
		if (isFinish) {
			g.drawImage(scoreMenu, 0, 0, gameloop.getWidth(),
					gameloop.getHeight(), null);

			g.setFont(font);
			g.setColor(Color.WHITE);
			g.drawString(totalScore, 520, 253);
			g.drawString(stopwatch, 520, 373);
		}
	}
}
